APPENDIX: The Accompanying Files OVERVIEW OF THE ACCOMPANYING FILES ================================== Besides the individual chapter text files, ETHAN.ZIP contains all of the example code, BASIC programs, and assembly language source files used in this book. The example BASIC files have names like CHAPn-n.BAS, where the first part of the name indicates which chapter the example was used in, and the second part is the listing number within that chapter. The remaining BASIC files use more descriptive names, and those are the ones you're most likely to actually use and add to your own programs. Likewise, the shorter assembly language examples from Chapter 12 are in files named CHAP12-n.ASM, but source code for the complete routines are in files having names based on the actual routine names. The library files named BASIC.* are meant for use with QuickBASIC version 4.0 or later, and the files named BASIC7.* are for use with BASIC PDS and VB/DOS. Files with a .QLB extension are Quick Libraries that you load along with QB.EXE or QBX.EXE or VBDOS.EXE, depending on your version of BASIC. The .LIB files are intended for use with LINK, when you create executable programs. There are also a few .BI (BASIC Include) and .MAK (Make) files used to support some of the programs. I did not bother to include separate .OBJ files for the assembly language routines, since you can easily extract them from BASIC.LIB or BASIC7.LIB if you need them. STARTING BASIC To start QuickBASIC and load the BASIC.QLB library, enter this from the DOS command line: qb [program] /l basic.qlb /ah If you specify the optional BASIC source program name, that is loaded into the QuickBASIC editor along with the BASIC.QLB library. The /ah switch tells QuickBASIC to allow huge (greater than 64K) arrays, which is needed for some of the demonstration programs. If you are using BASIC PDS, start QBX as follows: qbx [program] /l basic7.qlb /ah /es The /es switch is needed for the EMS.BAS demonstration, and it tells QBX to cooperate with your use of Expanded memory. When /es is omitted, QBX assumes no other programs are using EMS, which lets it access that memory slightly faster. Since EMS.BAS stores its sample data in Expanded memory, this option is needed to avoid corrupting EMS memory. Even if you do not plan to run EMS.BAS, using /es is harmless. If you have VB/DOS you should start it like this: vbdos [program] /l basicvbd.qlb /ah /es Once the appropriate Quick Library has been loaded, you may use the File Open menu sequence to load the BASIC programs. Note that with VB/DOS, the Open menu defaults to a .MAK extension, so you'll have to enter *.BAS or type the complete name of a BASIC program source file. Some of the example programs use BASIC's CALL Interrupt command, and to run those you will have to quit the BASIC editor, and restart it loading the default Quick Library that comes with your version of BASIC. You do not need to specify a Quick Library name when loading the default library; using only the /l switch is sufficient. LINKING When you compile and link programs manually from the DOS prompt and you want to use the .LIB libraries supplied with this book, you must specify the library name manually on the LINK command line: link program [/options] , , nul, basic[7] ; The BASIC7 library works with both BASIC PDS and also VB/DOS, so it was not necessary to provide a separate BASICVBD.LIB file. You can also compile and link from within the QuickBASIC or QBX editors using the menu options. When a Quick Library is loaded, the BASIC editor uses the same first name for the LINK library when it shells to run BC and LINK. For example, if you started QBX like this: qbx /l basic7.qlb QBX tells LINK to use a parallel .LIB library named BASIC7.LIB. But since there is no BASICVBD.LIB file you must compile and link manually when using VB/DOS. If you don't use BASIC PDS you can optionally rename BASIC7.LIB to be BASICVBD.LIB. Then when you start VB/DOS as shown above it can specify the correct library name when it shells to LINK. The BASIC editor limits you to using either the Quick Library from this book *or* BASIC's version that contains CALL Interrupt--you cannot load two Quick Libraries at one time. However, you can link with more than one library when creating an executable program manually. This example is for QuickBASIC, and you would substitute QBX.LIB and BASIC7.LIB with PDS, or VBDOS.LIB and BASIC7.LIB when using VB/DOS: bc program [/o] ; link [/options] program [other modules], , nul, qb.lib basic.lib ;